import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)

const store = new Vuex.Store({
  state:{
    HOST:'http://localhost:8887',
    playFrame:false,
    url:'',  //视频播放地址
    isPlay:'',   //是否播放
    videoName:'',   //视频标题
  },
  getters:{
    playFrame:state => state.playFrame,
    url:state => state.url,
    isPlay:state => state.isPlay,
    videoName:state => state.videoName,
  },
  mutations:{
    setPlayFrame: (state,playFrame) => {state.playFrame = playFrame},
    setUrl: (state,url) => {state.url = url},
    setIsPlay:(state,isPlay) => {state.isPlay = isPlay},
    setVideoName:(state,videoName) => {state.videoName = videoName},
  }
})

export default store